/*
 * @Author: wuchao66_Git 2803670835@qq.com
 * @Date: 2023-12-09 10:20:17
 * @LastEditors: wuchao66_Git 2803670835@qq.com
 * @LastEditTime: 2023-12-15 15:10:07
 * @FilePath: \t167vuexg\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/*
 * @Author: wuchao66_Git 2803670835@qq.com
 * @Date: 2023-12-09 10:20:17
 * @LastEditors: wuchao66_Git 2803670835@qq.com
 * @LastEditTime: 2023-12-11 11:49:43
 * @FilePath: \t167vuexg\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/home'
  },//重定向
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/login/index.vue')
  },
  {
    path: '/main',
    name: 'main',
    component: () => import('../views/main/index.vue'),
    children:[{
      path: '/departments',
      name: 'departments',
      component: () => import('../views/depart/depart.vue')
    },
    {
      path: '/users',
      name: 'users',
      component: () => import('../views/user/index.vue')
    }]
  }
]

const router = new VueRouter({
  routes
})

export default router
